
	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>




<input type="text" id="fangjianhao" value="{$fangjianhao}" hidden="hidden">

<div class="background">
	<div class="yuyin" style="display:{$flag}">

		<span class="weui_btn weui_btn_warn">房主操作</span>
		
		<button id="tianliangle" class="weui_btn weui_btn_primary">天亮了（先竞选警长），查看昨晚情况</button></br> 
		<span id="zuowansideshi" class="weui_btn weui_btn_plain_default"></span>  

		
		
		
		<script type="text/javascript">
		$("#tianliangle").click(function(event){
			$.ajax({
				type:"POST",
				url:"{:U('Game/tianliangle')}",
				success:function(siderenshi)
				{
					$("#zuowansideshi").html("昨晚死的人是"+siderenshi+"号");
				}
			});
		});

		</script>
		</br>

		<input type="text" id="fangzhutoupiao">
		<button type="submit" id="piao" class="weui_btn weui_btn_mini weui_btn_primary">票他出去(别输入白痴)</button>
		</br>
		<script type="text/javascript">
			$("#piao").click(function(event){
				$.ajax({
					url:"{:U('Game/toupiao')}",
					type:"POST",
					data:{fangzhutoupiao:$("#fangzhutoupiao").val()}
					
				});
				alert("已投");
			});

		</script>
		</br>
		<audio src="__PUBLIC__/music/langrensha.mp3" controls="controls"></audio>  <!--黑闭，狼杀,女巫，预言家，天亮睁眼，竞选警长，昨晚 -->
	    <div style="border-top:2px solid #F00"></div>
	</div>
	<button id="kaiqiangzhuangtai">查看今晚开枪状态</button>
	<span hidden="hidden" id="zhuangtai"></span>
	</br>

	<script type="text/javascript">
		$("#kaiqiangzhuangtai").click(function(event){
			$.ajax({
				url:"{:U('Game/lieren2')}",
				type:"POST",
				data:{fangjianhao1:$("#fangjianhao").val()},
				success:function(flag){
					
					if (flag==1) {
						$("#zhuangtai").show();$("#zhuangtai").html("死后不能开枪");
						$("#daizou").attr({"disabled":"disabled"});
					}else{
						$("#zhuangtai").show();$("#zhuangtai").html("死后可以开枪");
					}
				}
			});
		});	
	</script>

	<span>死了以后带走几号（也可不带走人）</span>
	<input type="text" id="daizoujihao">
	<button id="daizou">带走</button>

	<script type="text/javascript">
		$("#daizou").click(function(event){
			var fangjianhao=$("#fangjianhao").val();
			$.ajax({
				url:"{:U('Game/lieren')}",
				type:"POST",
				data:{daizou:$("#daizoujihao").val(),fangjianhao1:fangjianhao},
				success:function(daizou)
				{
					alert("带走成功");
				}
			});
		});
	</script>
</div>

